package com.lzc.job_recom.repository;

import com.lzc.job_recom.model.Job;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface JobRepository extends MongoRepository<Job, String> {
    
    List<Job> findByCity(String city);
    
    @Query("{'工作城市': ?0, '职位名字': {$regex: ?1, $options: 'i'}}")
    List<Job> findByCityAndJobNameContaining(String city, String keyword);
} 